﻿<%@ Page Language="C#" MasterPageFile="~/web/pages/NhaTuyenDung.master" AutoEventWireup="true" CodeFile="nhatuyendung_tinnhan.aspx.cs" Inherits="web_pages_nhatuyendung_tinnhan" Title="Quan ly tin nhan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <div class="vl_left_news_main_tt">
        Xin chào : <%=Session["NTDtenNTD"].ToString() %>.
    </div>
    <div>
        <div style="width:99%; float: left;padding:1px " class="ui-widget ui-widget-content ui-corner-all ">
            <div style="height: 20px; padding-top: 5px; padding-left: 20px;" class="ui-widget-header ui-corner-all ">
                Hộp thư &nbsp;</div>
            <div style="padding: 5px;width:99%" >
            <h4>
                    <span class="ui-icon ui-icon-power" style="float: left; margin-right: 0.3em;"></span>
                Tin nhắn chưa đọc:
                </h4>
            <div class="ui-widget ui-widget-content ui-corner-all" style="padding:3px;">
              <table style="width:100%; text-align: left;" >
                <tr>
                    <th  style="height: 1px; width: 367px; border-bottom: #ccc 1px dotted;" >
                    <span class="ui-icon ui-icon-newwin" style="float:left"></span>
                    Tiêu Đề </th>
                    <th style="height: 1px; width: 151px; border-bottom: #ccc 1px dotted;"> Người gởi</th>
                    <td style="height: 1px; width: 134px; border-bottom: #ccc 1px dotted;"> Điều Chỉnh </td>
                </tr>
                <%
                    if (dtt_chuadoc.Rows.Count > 0)
                    {
                        for (int i = 0; i < dtt_chuadoc.Rows.Count; i++)
                        {
                 %>
                <tr>
                    <th  style="height: 1px; width: 367px; border-bottom: #ccc 1px dotted;" >
                    <span class="ui-icon ui-icon-newwin" style="float:left"> </span> <a href="javascript:void(0);" onclick="javascript:xemtinnhan('<%=dtt_chuadoc.Rows[i]["id"].ToString() %>')">  <%=dtt_chuadoc.Rows[i]["tieu_de"].ToString()%> (<%=Convert.ToDateTime(dtt_chuadoc.Rows[i]["ngay_gui"]).ToString("dd/MM/yyyy")%>)</a>
                    </th>
                    <th style="height: 1px; width: 151px; border-bottom: #ccc 1px dotted;"> <%=comm.getTenNTV(dtt_chuadoc.Rows[i]["nguoi_gui"].ToString(), dtt_chuadoc.Rows[i]["kieu_nguoi_gui"].ToString())%> </th>
                     <td style="height: 1px; width: 134px; border-bottom: #ccc 1px dotted;"> 
                         <%--<a href="javascript: if(confirm('Xóa tin nhắn này')) window.location = 'xoatinnhan.aspx?id=<%=dtt_dadoc.Rows[i]["id"].ToString()%>'"> [ Xóa ] </a> --%>
						 <%if(!(dtt_chuadoc.Rows[i]["nguoi_gui"].ToString()=="0")){%>
                         <a  href="javascript:void(0);" 
                            onclick="javascript:window.open('nhantin.aspx?idgui=<%=dtt_chuadoc.Rows[i]["nguoi_nhan"].ToString()%>&idnhan=<%=dtt_chuadoc.Rows[i]["nguoi_gui"].ToString()%>&type=1','','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=480,left = 320,top = 160')"> [ Trả lời ] </a>
						<%}%>
                    </td>
                </tr>
                <%
                    }
                }
                 %>
                 </table>
                 </div>   
              <h4>
                    <span class="ui-icon ui-icon-power" style="float: left; margin-right: 0.3em;"></span>
                    Tin Nhắn đã đọc :</h4>
            <div class="ui-widget ui-widget-content ui-corner-all" style="padding:3px;">
            <table style="width:100%; text-align: left;" >
                <tr>
                    <th  style="height: 1px; width: 367px; border-bottom: #ccc 1px dotted;" >
                    <span class="ui-icon ui-icon-newwin" style="float:left"></span>
                    Tiêu Đề </th>
                    <th style="height: 1px; width: 151px; border-bottom: #ccc 1px dotted;"> Người gởi</th>
                    <td style="height: 1px; width: 134px; border-bottom: #ccc 1px dotted;"> Điều Chỉnh </td>
                </tr>
                <%
                    for (int i = 0; i < dtt_dadoc.Rows.Count; i++)
                    {
                 %>
                <tr>
                    <th  style="height: 1px; width: 367px; border-bottom: #ccc 1px dotted;" >
                    <span class="ui-icon ui-icon-newwin" style="float:left"> </span> <a href="javascript:void(0);" onclick="javascript:xemtinnhan('<%=dtt_dadoc.Rows[i]["id"].ToString() %>')">  <%=dtt_dadoc.Rows[i]["tieu_de"].ToString()%> (<%=Convert.ToDateTime(dtt_dadoc.Rows[i]["ngay_gui"]).ToString("dd/MM/yyyy")%>)</a>
                    </th>
                    <th style="height: 1px; width: 151px; border-bottom: #ccc 1px dotted;"> <%=comm.getTenNTV(dtt_dadoc.Rows[i]["nguoi_gui"].ToString(), dtt_dadoc.Rows[i]["kieu_nguoi_gui"].ToString())%> </th>
                    <td style="height: 1px; width: 134px; border-bottom: #ccc 1px dotted;"> <a href="javascript: if(confirm('Xóa tin nhắn này')) window.location = 'nhatuyendung_tinnhan.aspx?act=del&id=<%=dtt_dadoc.Rows[i]["id"].ToString() %>'"> [ Xóa ] </a> 
					<%if(!(dtt_dadoc.Rows[i]["nguoi_gui"].ToString()=="0")){%>
					<a href="javascript:void(0);" onclick="javascript:window.open('nhantin.aspx?idgui=<%=dtt_dadoc.Rows[i]["nguoi_nhan"].ToString()%>&idnhan=<%=dtt_dadoc.Rows[i]["nguoi_gui"].ToString()%>&type=1','','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=480,left = 320,top = 160')"> [ Trả lời ] </a></td>
					<%}%>
                </tr>
                <%
                     }
                 %>
                 </table>
                
                 </div>  
                        
                          
            </div>
        </div>
        
    <div id="dialog_tinnhan" class="ui-dialog-content ui-widget-content" style="height: auto;
        min-height: 61px; max-height: 400px; overflow: auto; overflow-x: none; width: auto;
        text-align: left;">
    </div>
        
    </div>
    <script type="text/javascript">
        function xemtinnhan(matinnhan){
            $('#dialog_tinnhan').dialog('open');
            $('#dialog_tinnhan').load('xemtinnhan.aspx?id='+matinnhan);
            return false;
        }
        function traloitinnhan(idgoi,idnhan){
            $('#dialog_tinnhan').dialog('open');
            $('#dialog_tinnhan').load('nhantin.aspx?idgui='+idgoi+'&idnhan='+idnhan+'&type=1');
            return false;
        }
    </script>
   
</asp:Content>

